from threading import Thread
from Core import Vec3, world
import time

w = world()
nm = w.getNodeManager()
light = nm.getNodeByName("light0")


class MyThread(Thread):
    
    def __init__(self, delta):
        Thread.__init__(self)
        self.delta = delta

    def run (self):
        global light
        for i in range(1000):
            light.moveLocal(self.delta)
            time.sleep(.01)


t1 = MyThread(Vec3(0, -.01, 0))
t2 = MyThread(Vec3(.01, 0, 0))
t1.start()
t2.start()
t1.join()
t2.join()
